package com.chexiehui.jc.mvp.home;

import com.chexiehui.jc.Constants;
import com.chexiehui.jc.base.BaseModel;
import com.chexiehui.jc.base.BasePage;
import com.chexiehui.jc.base.BaseView;
import com.chexiehui.jc.entity.BorrowingInfo;

import io.reactivex.Observable;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

/**
 * @Description 借款服务
 * @Auth SongJun
 * @Date 2019/11/20 10:05
 **/
public interface LoanServicesListCovenant {

    interface View extends BaseView {
        void onGetListSuccess(BaseModel<BasePage<BorrowingInfo>> successResult);

        void onGetListFailure(BaseModel<Object> failureResult);
    }

    interface Stores {

        @FormUrlEncoded
        @POST(Constants.URL_LOAN_SERVICES_LIST)
        Observable<BaseModel<BasePage<BorrowingInfo>>> getList(
                @Field("pageIndex") int pageIndex,
                @Field("pageSize") int pageSize);
    }

    interface Presenter {
        void getList(int pageNum);
    }

}